import server from '@/config/server/index.js'

function post(path, auth = true, config = true) {
  return server.api().post(path).auth(auth).config(config)
}

// function get(path, auth = true, config = true) {
//   return server.api().get(path).auth(auth).config(config)
// }

let api = {
  // 钱包报表
  getWalletListStatistics: post('/dt-marketing/wallet/getWalletListStatistics'),
  getWalletWebList: post('/dt-marketing/wallet/getWalletWebList'),
  walletWebListExport: post('/dt-marketing/wallet/walletWebListExport').tag('downloadCenter'),
  // 钱包统计
  getWalletStatistics: post('/dt-marketing/wallet/getWalletStatistics'),
  getWalletStatisticsWebList: post('/dt-marketing/wallet/getWalletStatisticsWebList'),
  walletStatisticsWebListExport: post('/dt-marketing/wallet/walletStatisticsWebListExport').tag(
    'downloadCenter'
  ),
  // 提现流水
  getWithdrawWebList: post('/dt-marketing/wallet/getWithdrawWebList'),
  withdrawWebListExport: post('/dt-marketing/wallet/withdrawWebListExport').tag('downloadCenter'),
  // 活动数据-参与用户
  getAcActivityCustomerList: post('/dt-marketing/acActivityCustomer/getAcActivityCustomerList'),
  TakeUserExport: post('/dt-marketing/acActivityCustomer/getAcActivityCustomerList/export').tag(
    'downloadCenter'
  ),
  // 复制活动
  copyAcBasics: post('/dt-marketing/basics/copyAcBasics')
}

function getWalletListStatistics(info) {
  return api.getWalletListStatistics.fetch(info)
}

function getWalletWebList(info) {
  return api.getWalletWebList.fetch(info)
}

function walletWebListExport(info) {
  return api.walletWebListExport.fetch(info)
}

function getWalletStatistics(info) {
  return api.getWalletStatistics.fetch(info)
}

function getWalletStatisticsWebList(info) {
  return api.getWalletStatisticsWebList.fetch(info)
}

function walletStatisticsWebListExport(info) {
  return api.walletStatisticsWebListExport.fetch(info)
}

function getWithdrawWebList(info) {
  return api.getWithdrawWebList.fetch(info)
}

function withdrawWebListExport(info) {
  return api.withdrawWebListExport.fetch(info)
}

function getAcActivityCustomerList(info) {
  return api.getAcActivityCustomerList.fetch(info)
}

function TakeUserExport(info) {
  return api.TakeUserExport.fetch(info)
}

function copyAcBasics(info) {
  return api.copyAcBasics.fetch(info)
}

export default {
  getWalletListStatistics,
  getWalletWebList,
  walletWebListExport,
  getWalletStatistics,
  getWalletStatisticsWebList,
  walletStatisticsWebListExport,
  getWithdrawWebList,
  withdrawWebListExport,
  getAcActivityCustomerList,
  TakeUserExport,
  copyAcBasics
}
